//
//  SCMaintenCarView.m
//  Shuaiche
//
//  Created by liyanan on 2019/8/6.
//  Copyright © 2019 zzs. All rights reserved.
//

#import "SCMaintenCarView.h"
#import "UIImageView+WebCache.h"


@interface SCMaintenCarView()

@property (weak, nonatomic) IBOutlet UIImageView *carLogoImg;
@property (weak, nonatomic) IBOutlet UILabel *carNameLab;
@property (weak, nonatomic) IBOutlet UILabel *vcodeLab;

@end


@implementation SCMaintenCarView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
    }
    return self;
}
- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setCarName:(NSString *)carName {
    _carName = carName;
    _carNameLab.text = carName.length ? carName : @"-";
}
-(void)setVcode:(NSString *)vcode {
    _vcode = vcode;
    _vcodeLab.text = [NSString stringWithFormat:@"VIN: %@", vcode];
}
-(void)setBrandLogo:(NSString *)brandLogo {
    _brandLogo = brandLogo;
    [_carLogoImg sd_setImageWithURL:[NSURL URLWithString:sc_url_img(brandLogo)] placeholderImage:[UIImage imageNamed:@"company_default_icon"]];
}
@end
